<template>
    <d2-container>
      <template slot="header">后台充值记录</template>
      <el-table
        :data="tableData"
        border
        style="width: 100%">
        <el-table-column
          prop="user"
          label="用户名称"
          >
        </el-table-column>
        <el-table-column
          prop="transaction"
          label="订单号"
          >
        </el-table-column>
        <el-table-column
          prop="payment_amount"
          label="充值金额">
        </el-table-column>
      </el-table>
      <el-pagination
        @current-change="handleCurrentChange"
        :current-page.sync="page"
        :page-size="10"
        layout="total, prev, pager, next"
        :total="Number(count)">
      </el-pagination>
    </d2-container>
</template>

<script>
  import {AdminAlilog} from "@/api/sys.login";
  export default {
    name: "index",
    data() {
      return {
        tableData:[],
        page:1,
        count:'',
        pagesize:10,
      }
    },
    methods:{
      handleCurrentChange(val){
        this.page = val
        this.getzfblist()
      },
      getzfblist() {
        AdminAlilog(this.page,this.pagesize).then(res => {
          if (res.status == 200) {
            this.tableData = res.list
            this.count = res.count
          }
        })
      },
    },
    created() {
      this.getzfblist()
    }
  }
</script>

<style>

</style>
